home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 June
/
EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso
/
earcd
/
library
/
klngnccn.lha
/
klingon-accent
/
Install
< prev
next >
Wrap
Text File
|
1996-04-18
|
4KB
|
123 lines
; script to install Translator library and klingon.accent file
; Should be run from Workbench by double-clicking on the icon
(set @default-dest (expandpath "Sys:"))
;; Install library
(set OS-Version (/ (getversion "dos.library" (resident)) 65536))
(if (>= OS-Version 37)
(if (>= (database "cpu") 68020)
((set libext "020") (set name "V37, CPU 68020"))
((set libext "v37") (set name "V37")))
((set libext "v33") (set name "V33")))
(set libname (cat libext "_translator.library"))
;; Install library
;; Save old version if it exists.
(if (exists "libs:translator.library")
( (set oldver (getversion "Libs:translator.library"))
(if (< oldver (* 65536 42))
( (set oldnum ("%ld.%ld" (/ oldver 65536) (bitand oldver 65535)))
(set oldname ("LIBS:%s-translator.library" oldnum))
(rename "LIBS:translator.library"
oldname
(prompt
"You currently have version " oldnum " of the "
"origional Commodore translator.library installed. "
"Do you wish to have it saved and renamed?")
(help "The pre-V42 version of LIBS:translator.library "
"currently installed "
"will be renamed as " oldname " if you select Proceed.")
(confirm))))))
(copylib
(source (cat "Libs/" libname))
(dest "Libs:")
(confirm)
(prompt "Install the translator.library "
"version for use with an Amiga ROM version " name
" or better.")
(help "Install the translator shared library file")
(newname "translator.library"))
;; Install accent file
(if (not (exists "Locale:"))
((if (not (exists "sys:Locale"))
(makedir "SYS:Locale"
(prompt "Creating directory SYS:Locale")
(help "SYS:Locale is needed by the locale library "
"and the translator library")
(infos)
(safe)))
(makeassign "Locale" "Sys:Locale" (safe))
(startup "Translator"
(prompt "Modify S:User-startup?")
(command "Assign Locale: SYS:Locale"))
))
(if (not (exists "Locale:Accents"))
(makedir "Locale:Accents"
(prompt "Creating directory Locale:Accents")
(help "Locale:Accents is needed by "
"the translator library")
(infos)
(safe)))
(copyfiles
(help "Select which Accent files you wish installed "
"into the Locale:Accents/ directory.\n\n"
"These files specify how words should be pronounced in each "
"language. At least one needs to be installed if the translator "
"library is to work.")
(prompt "Which accent files do you wish to install?\n"
"Note that at least one is needed for the translator "
"library to work.")
(source "Accents")
(dest "Locale:Accents/")
(pattern "#?.accent")
(files)
(confirm))
;; Install environment variables
(if (= @user-level 2)
(set accent-file
(askfile (prompt "Which accent do you wish to use by default?")
(default "Locale:Accents/american.accent")
(help "Specify the accent file that contains the default "
"pronuciation rules for the translator library. "
"This will be saved in your ENVARC: and ENV: but "
"can be changed later with the Translator "
"preferences program (not included).")))
(set accent-file "Locale:Accents/klingon.accent"))
(if (exists "ENVARC:")
(textfile
(dest "ENVARC:Sys/translator.prefs")
(append accent-file))
(startup
(prompt "Modify S:User-Startup")
(command ("IF NOT EXISTS ENV:Sys\nMakeDir ENV:Sys\nEndIf\n"
"Setenv Sys/translator.prefs"))))
(if (not (exists "ENV:Sys/")) (makedir ("ENV:Sys")))
;; The end!